<?php $this->renderPartial('../common/_header');?>
<div class="container my-container">
    <div class="row">
        <div class="col col-lg-3">
            <?php $this->renderPartial('//common/'.($this->user ? 'menu' : 'menu_guest'));?>
        </div>
        <div class="col col-lg-9">

            <div id="content-login">

                <div class="col col-lg-6">
                    <div class="page-header">
                        <h2>Đăng ký tài khoản</h2>
                    </div>


                    <?php $form=$this->beginWidget('CActiveForm', array(
                            'id'=>'create-form',
                            'enableClientValidation'=>true,
                            'clientOptions'=>array(
                                'validateOnSubmit' => true,
                                'validateOnChange' => true,
                            ),
                            'enableAjaxValidation'=>false,
                            'htmlOptions' => array('class' => 'form-horizontal my-form')
                        )); ?>

                    <div class="row">
                        <?php echo $form->labelEx($model,'name', array('class' => 'col col-lg-4 control-label')); ?>
                        <div class="col col-lg-8">
                            <?php echo $form->textField($model,'name',array('placeholder'=> $model->getAttributeLabel('name'),'maxlength'=>255)); ?>
                            <?php echo $form->error($model,'name');?>
                        </div>
                    </div> 
                    <div class="row">
                        <?php echo $form->labelEx($model,'username', array('class' => 'col col-lg-4 control-label')); ?>
                        <div class="col col-lg-8">
                            <?php echo $form->textField($model,'username',array('placeholder'=> $model->getAttributeLabel('username'),'maxlength'=>255)); ?>
                            <?php echo $form->error($model,'username');?>
                        </div>
                    </div> 
                    <div class="row">
                        <?php echo $form->labelEx($model,'password', array('class' => 'col col-lg-4 control-label')); ?>
                        <div class="col col-lg-8">
                            <?php echo $form->passwordField($model,'password',array('placeholder'=> $model->getAttributeLabel('password'),'maxlength'=>255)); ?>
                            <?php echo $form->error($model,'password');?>
                        </div>
                    </div> 
                    <div class="row">
                        <?php echo $form->labelEx($model,'rePassword', array('class' => 'col col-lg-4 control-label')); ?>
                        <div class="col col-lg-8">
                            <?php echo $form->passwordField($model,'rePassword',array('placeholder'=> $model->getAttributeLabel('rePassword'),'maxlength'=>255)); ?>
                            <?php echo $form->error($model,'rePassword');?>
                        </div>
                    </div> 
                    <div class="row">
                        <?php echo $form->labelEx($model,'verifyCode', array('class' => 'col col-lg-4 control-label')); ?>
                        <div class="col col-lg-8">
                            <?php echo $form->textField($model,'verifyCode', array('class' => 'input-small input-captcha')); ?>
                            <?php $this->widget('CCaptcha', Yii::app()->params->captcha['view']); ?>
                            <?php echo $form->error($model,'verifyCode');?>
                        </div>
                        <div class="col col-lg-8 col-offset-4 margintop15">
                            <?php echo $form->checkBox($model,'condition')?>
                            <label for="CreateUserForm_condition">
                                Đồng ý với <a href="<?php echo $this->createUrl('/user/page/condition')?>">điều khoản sử dụng</a>
                            </label> 
                            <?php echo $form->error($model,'condition'); ?>                          
                        </div>

                        <div class="col col-lg-8 col-offset-4 margintop15">
                            <button class="btn btn-primary" type="submit">
                                <i class="icon-coffee"></i> Đăng ký
                            </button>                               
                        </div>
                        <div class="col col-lg-8 col-offset-4 margintop15 link-more">
                            <a href="<?php echo $this->createUrl('/user/page/login')?>" class="decoration-none" data-toggle="tooltip" data-placement="top"><span class="label label-success">Đăng nhập</span></a>
                            <a href="<?php echo $this->createUrl('/user/page/forgot')?>" class="decoration-none" data-toggle="tooltip" data-placement="left"><span class="label label-warning">Quên mật khẩu</span></a>
                        </div>
                    </div> 

                    <?php $this->endWidget(); ?>
                </div>

                <div class="col col-lg-6">
                    <?php $this->renderPartial('_openid_login');?>
                </div>
            </div>
            
        </div>
    </div>
</div>